//
//  YXTaskModel.h
//  MockProject
//
//  Created by FanYu on 29/8/2016.
//  Copyright © 2016 niuzhaowang. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger, TaskStatus) {
    YXTaskStatusDownloading,
    YXTaskStatusPause,
    YXTaskStatusWaiting,
    YXTaskStatusFailed,
    YXTaskStatusPrepare,
    YXTaskStatusDownloaded,
    YXTaskStatusNA
};



@interface YXTaskModel : NSObject

@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *url;
@property (nonatomic, copy) NSString *uid;
@property (nonatomic, copy) NSString *time;
@property (nonatomic, copy) NSString *size;
@property (nonatomic, copy) NSString *speed;
@property (nonatomic, copy) NSString *progress;
@property (nonatomic, copy) NSString *sizePercent;
@property (nonatomic, copy) NSString *filePath;

@property (nonatomic, assign) BOOL isHidden;
@property (nonatomic, assign) BOOL isSelected;

@property (nonatomic, assign) NSNumber *status;

// load data
+ (YXTaskModel *)configLoadDataWithUID:(NSString *)uid title:(NSString *)title url:(NSString *)url;

// downloaded
+ (YXTaskModel *)configDownloadWithTitle:(NSString *)title time:(NSString *)time size:(NSString *)size isHidden:(BOOL)hidden isSelected:(BOOL)selected;

// downloading
+ (YXTaskModel *)configDownloadingWithTitle:(NSString *)title size:(NSString *)size speed:(NSString *)speed progress:(CGFloat)progress downloadStatus:(TaskStatus)status;

// task list
+ (YXTaskModel *)configTaskWithTitle:(NSString *)title size:(NSString *)size time:(NSString *)time downloadStatus:(TaskStatus)status;

@end
